<template>
  <router-view></router-view>
  <TabBar v-if="showTabBar"/>
</template>

<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import TabBar from '@/components/TabBar.vue'

const route = useRoute()

// 控制哪些页面显示底部导航
const showTabBar = computed(() => {
  const hideTabBarRoutes = ['/login', '/register', '/business-detail']
  return !hideTabBarRoutes.includes(route.path)
})
</script>

<style>
#app {
  padding-bottom: 50px;
}
</style>
